package com.erytech.linktalk.web.client.datasource;

import com.erytech.linktalk.web.client.framework.DataUpdateEvent;
import com.erytech.linktalk.web.client.service.UserInfo;

public class UserUpdateEvent extends DataUpdateEvent {

	public static final int LOGIN_SUCCESS = 1;

	public static final int LOGIN_FAILURE = 2;

	public static final int LOGOUT_SUCCESS = 3;
	
	public static final int LOGOUT_FAILURE = 4;

	public static final int POLL_SUCCESS = 5;

	public static final int POLL_FAILURE = 6;

	public static final int SAID_TO = 7;

	private UserInfo[] users;

	private Throwable throwable;

	private String userName;

	public UserUpdateEvent(Object src, int type) {
		super(src, type);
	}

	public UserUpdateEvent(Object src, int type, UserInfo[] users) {
		super(src, type);
		this.users = users;
	}

	public UserUpdateEvent(Object src, int type, Throwable t) {
		super(src, type);
		this.throwable = t;
	}

	public UserUpdateEvent(Object src, int type, String userName) {
		super(src, type);
		this.userName = userName;
	}

	public String getUserName() {
		return userName;
	}

	public UserInfo[] getUsers() {
		return users;
	}

	public Throwable getThrowable() {
		return throwable;
	}

}
